<?php
/**
 * Created by PhpStorm.
 * User: 熵
 * Date: 2021/12/12
 * Time: 21:24
 */

class dbtool
{
    private static $conn;
    public static function setconn($conn){
        self::$conn=$conn;
    }
    public static function selectconn($sql){
        $result=self::$conn->query($sql);
        $data=[];
        while (true){
            $row=$result->fetch_assoc();
            if (empty($row)){
                break;
            }
            $data[]=$row;
        }
        return $data;
    }
}